﻿@{
    ViewBag.Title = "房产管理";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<script src="~/Content/scripts/jquery/layer/jquery.js?v=1.83.min"></script>
<script src="~/Content/scripts/jquery/jquery-2.0.3.min.js"></script>
<script src="~/Content/scripts/jquery/layer/layer.min.js"></script>
<link href="~/Content/styles/font-awesome.min.css" rel="stylesheet" />
<link href="~/Content/styles/BillDetail.css?v=1.1" rel="stylesheet" />
<link href="~/Content/styles/anitmate.css" rel="stylesheet" />
<link href="~/Content/styles/style.css" rel="stylesheet" />
<link href="~/Content/scripts/plugins/tree/tree.css" rel="stylesheet" />
<link href="~/Content/scripts/plugins/jqgrid/jqgrid.css" rel="stylesheet" />
<script src="~/Content/scripts/plugins/tree/tree.js"></script>
<script src="~/Content/scripts/plugins/jqgrid/grid.locale-cn.js"></script>
<script src="/Content/scripts/plugins/validator/js?v=XgpF3bkqcHESsLip2j1dhS6n2I-zHyD2VCazpanqH6Q1"></script>
<script src="/Content/scripts/utils/js?v=FNqaC7G7A87_J4VCIQpQEAO-d_2Qf2wSxoZexwRzulo1"></script>
<script src="~/Content/scripts/plugins/jqgrid/jqgrid.min.js"></script>
<script src="~/Content/scripts/jquery/ajaxfileupload.js"></script>
<style type="text/css">
    html, body {
        background-color: #fff;
    }
</style>
<script>
    var keyValue = request('keyValue');
    var organizeId = request('organizeId');
    var parentId = request('parentId');
    var _Id = "";
    var _type = 1;//房产性质默认为楼盘
    var _ptype;
    var allname = "";
    var Code = '@ViewBag.GCode';
    $(function () {
        //checkBillCode('Code', '@ViewBag.GCode');
        initControl();
        $("td.formValue").children().attr("disabled", "disabled");
    })


    function setDisplay() {
        switch (_type) {
            case 1: {
                $('#PProperty').css("display", "block");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $("#gridPanel").css("display", "none");
                $("#PPropertyType").append($("#PropertyType"));
            } break;
            case 2: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "block");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $("#gridPanel").css("display", "none");
            } break;
            case 3: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "block");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $("#gridPanel").css("display", "none");
            } break;
            case 4: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "block");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $("#gridPanel").css("display", "none");
            } break;
            case 5: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "block");
                $("#HouseO").css("display", "block");
                $("#gridPanel").css("display", "block");
                $("#PRoomType").append($("#PropertyType"));
            } break;
        }
    }
    function setPStructTree() {
        $("#PStructTree").ComboBoxTree({
            url: "../../ResourceManage/RS_PStructs/GetTreeJson?type=" + _type + "&organizeid=" + organizeId,
            height: "250px",
            description: "==请选择==",
            click: function (item) {
                
                if (parentId != item.id) {
                    _ptype = parseInt(item.Type);
                    allname = item.PSAllName;
                    parentId = item.id;
                    $("#AllName").val(item.PSAllName);
                }
            }
        });
    }

    //加载房间物品表格
    function GetGrid() {
        var $gridTable = $("#gridTable");
        $gridTable.jqGrid({
            datatype: "json",
            height: 189,
            autowidth: true,
            unwritten: false,
            colModel: [
                    { label: 'ID', name: 'Id', hidden: true },
                    { label: '部位', name: 'PSMemo', hidden: true },
                    { label: '物品名称', name: 'Name', hidden: true },
                    {
                        label: "部位", name: "PSMemoText", width: 100, align: "left", sortable: true,
                        formatter: function (cellvalue, options, rowObject) {
                            switch (rowObject.PSMemo) {
                                case "0": return "墙壁";
                                case "1": return "衣柜";
                                default: return "";
                            }
                        }
                    },
                    {
                        label: "物品名称", name: "NameText", width: 100, align: "left", sortable: true,
                        formatter: function (cellvalue, options, rowObject) {
                            switch (rowObject.Name) {
                                case "0": return "床头灯";
                                case "1": return "花瓶";
                                default: return "";
                            }
                        }
                    },
                    { label: '物品编号', name: 'Code', width: 100, align: "left", sortable: false },
                    { label: "规格型号", name: "ModelNo", width: 100, align: "left", sortable: false },
                    { label: "数量", name: "Num", width: 100, align: "left", sortable: false },
                    { label: "赔偿单价", name: "UnitPrice", width: 100, align: "left", sortable: false },
                    { label: "备注", name: "Memo", width: 330, align: "left", sortable: false },
            ],
            caption: "房间物品",
            rowNum: "1000",
            rownumbers: true,
            shrinkToFit: false,
            gridview: true,
            hidegrid: false
        });
    }
    //初始化控件
    function initControl() {
        //省市区联动
        $("#Province").ComboBox({
            url: "../../SystemManage/Area/GetAreaListJson",
            param: { parentId: "0" },
            id: "AreaCode",
            text: "AreaName",
            description: "选择省",
            height: "170px"
        }).bind("change", function () {
            var value = $(this).attr('data-value');
            $("#City").ComboBox({
                url: "../../SystemManage/Area/GetAreaListJson",
                param: { parentId: value },
                id: "AreaCode",
                text: "AreaName",
                description: "选择市",
                height: "170px"
            });
        });
        //城市
        $("#City").ComboBox({
            description: "选择市",
            height: "170px"
        }).bind("change", function () {
            var value = $(this).attr('data-value');
            if (value) {
                $("#Region").ComboBox({
                    url: "../../SystemManage/Area/GetAreaListJson",
                    param: { parentId: value },
                    id: "AreaCode",
                    text: "AreaName",
                    description: "选择县/区",
                    height: "170px"
                });
            }
        }
        );
        //县/区
        $("#Region").ComboBox({
            description: "选择县/区",
            height: "170px"
        }).bind("change", function () {
            var value = $(this).attr('data-value');
            if (value) {
                $("#Township").ComboBox({
                    url: "../../SystemManage/Area/GetListJson",
                    param: { value: value },
                    id: "AreaCode",
                    text: "AreaName",
                    description: "选择乡镇街道",
                    height: "170px"
                });
            }
        });
        //乡镇街道
        $("#Township").ComboBox({
            description: "选择乡镇街道",
            height: "170px"
        });

        //所属机构
        $("#OrganizeId").ComboBoxTree({
            url: "../../BaseManage/Organize/GetTreeJson",
            description: "==请选择==",
            height: "250px",
            click: function (item) {
                if (item.id != organizeId) {
                    organizeId = item.id;
                    //allname = item.text;
                    parentId = "";
                    setPStructTree();
                }
            }
        });



        $("#Bois").click(
           function () {
               $("#ImageInfo").hide();
               $("#roomPanel").hide();
           }
           );
        $("#ImIn").click(
            function () {
                $("#ImageInfo").show();
                $("#roomPanel").hide();
            }
            );
        $("#HouseO").click(
            function () {
                $("#ImageInfo").hide();
                $("#roomPanel").show();
            }
            );
        $("#Other").click(
            function () {
                $("#ImageInfo").hide();
                $("#roomPanel").hide();
            }
            );


        if (!!organizeId) {
            $("#OrganizeId").ComboBoxTreeSetValue(organizeId);
            //allname = $("#OrganizeId").attr("data-text");
        }
        //朝向
        //$("#")
        //上级房产
        setPStructTree();

        //房产性质
        $("#Type").ComboBox({
            // data: [{ "key": 1, "value": "楼盘" }, { "key": 2, "value": "楼阁|楼栋|单元|梯" }, { "key": 3, "value": "车库|广告位区域|场地区域|冷库" }, { "key": 4, "value": "楼层|网点" }, { "key": 5, "value": "房间|床位" }],
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "PstructType" },
            id: "value",
            text: "text",
            height: "200px",
            description: "==请选择==",
        }).bind("change", function () {
            _type = parseInt($("#Type").attr("data-value"));
            setDisplay();
            //上级房产
            setPStructTree();
        });
        //当前状态
        $("#State").ComboBox({
            data: [{ "key": 1, "value": "空置" }, { "key": 2, "value": "已租" }, { "key": 3, "value": "自用" }],
            id: "key",
            text: "value",
            height: "200px",
            description: "==请选择==",
        });
        //朝向
        $("#HouseTypeName").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "HouseDirect" },
            id: "value",
            text: "text",
            description: "==请选择==",
        });
        //户型
        $("#HouseType").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "HouseType" },
            id: "value",
            text: "text",
            description: "==请选择==",
        });
        //物业类型
        $("#PropertyType").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "PropertyType" },
            id: "value",
            text: "text",
            height: "200px",
            description: "==请选择==",
        });

        GetGrid();
        //获取表单
        if (!!keyValue) {
            $.SetForm({
                url: "../../ResourceManage/RS_PStructs/GetFormInfoJson",
                param: { keyValue: keyValue },
                success: function (data) {
                    $("#form1").SetWebControls(data.data);
                    parentId = data.data.ParentId;
                    organizeId = data.data.OrganizeId;
                    _type = parseInt(data.data.Type);
                    if (!!data.FileList) {
                        var _html = "";
                        $(data.FileList).each(function (index, item) {
                            _html += '<div id="item_0_' + index + '" class="uploadify-queue-item"><div style="float:left;width:50px;margin-right:2px;"><img src="/Content/images/filetype/' + item.FileName.substring(item.FileName.lastIndexOf(".") + 1) + '.png" style="width:40px;height:40px;"></div><span class="fileName">' + item.FileName + '</span><span class="data"> </span></div>'
                        });
                        $("#uploadify-queue").append(_html);
                    }
                    allname = data.data.AllName.substring(0, data.data.AllName.indexOf('/' + data.data.Name));
                    _Id = data.model.Id;
                    switch (data.data.Type) {
                        case 1: $("#PProperty").SetWebControls(data.model); $("#Type").ComboBoxSetValue(data.model.PropertyType); $("#Province").ComboBoxSetValue(data.model.Province); $("#Province").trigger("change"); $("#City").ComboBoxSetValue(data.model.City); $("#City").trigger("change"); $("#Region").ComboBoxSetValue(data.model.Region); $("#Region").trigger("change"); $("#Township").ComboBoxSetValue(data.model.Township); break;
                        case 2: $("#PPavilion").SetWebControls(data.model); $("#CoverAreaPavilion").val(data.model.CoverArea); $("#DatePavilion").val(data.model.Date); break;
                        case 3: $("#PGarage").SetWebControls(data.model); $("#AreaGarage").val(data.model.Area); $("#DateGarage").val(data.model.Date); break;
                        case 4: $("#PFloor").SetWebControls(data.model); $("#AreaFloor").val(data.model.Area); break;
                        case 5: $("#PRoom").SetWebControls(data.model.RoomInfo); $("#State").ComboBoxSetValue(data.model.RoomInfo.State); $("#HouseTypeName").ComboBoxSetValue(data.model.RoomInfo.HouseTypeName); $("#HouseType").ComboBoxSetValue(data.model.RoomInfo.HouseType); $("#PropertyType").ComboBoxSetValue(data.model.RoomInfo.PropertyType); $("#gridTable")[0].addJSONData(data.model.RoomDetailList); break;
                        default:
                    }
                    SetFileDisplay(data.FileList);
                    $("#BaseInfo").SetWebControls(data.data);
                    setPStructTree();
                    //上级房产
                    $("#PStructTree").ComboBoxTreeSetValue(data.data.ParentId == "0" ? data.data.OrganizeId : data.data.ParentId);
                    $("#Type").ComboBoxSetValue(data.data.Type);
                    setDisplay();
                }
            });
        }
    };

</script>
<div>
    <input id="type" type="hidden" />
    <ul class="nav nav-tabs">
        <li class="active"><a href="#BaseInfo" data-toggle="tab" id="Bois">基本信息</a></li>
        <li><a href="#ImageInfo" data-toggle="tab" id="ImIn">相关图档</a></li>
        <li><a href="#roomPanel" data-toggle="tab" id="HouseO" style="display:none">房间物品</a></li>
        <li><a href="#ExpandInfo" data-toggle="tab" id="Other">其他信息</a></li>
    </ul>
    <div class="tab-content" style="padding-top: 15px;">
        <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;" id="BaseInfo" class="tab-pane active">
            <table class="form" id="BaseInfo">

                <tr>
                    <th class="formTitle">隶属机构<font face="宋体">*</font></th>
                    <td class="formValue">
                        <div id="OrganizeId" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
                    </td>
                    <th class="formTitle">房产性质<font face="宋体">*</font></th>
                    <td class="formValue">
                        <div id="Type" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">房产编号<font face="宋体">*</font></th>
                    <td class="formValue">
                        <input id="Code" type="text" onblur="$.ExistField(this.id, '../../ResourceManage/RS_PStructs/ExistCode')" class="form-control" isvalid="yes" checkexpession="NotNull" />
                    </td>
                    <th class="formTitle">房产名称<font face="宋体">*</font></th>
                    <td class="formValue">
                        <input id="Name" type="text" @*onblur="$.ExistField(this.id, '../../ResourceManage/RS_PStructs/ExistName')"*@ class="form-control" placeholder="请输入名称" isvalid="yes" checkexpession="NotNull" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">隶属上级<font face="宋体"></font><input type="hidden" id="fclx" value="0" /></th>
                    <td class="formValue">
                        <div id="PStructTree" type="selectTree" class="ui-select" isvalid="No"></div>
                    </td>
                    <th class="formTitle">房产全称</th>
                    <td class="formValue">
                        <input id="AllName" type="text" disabled class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">主图</th>
                    <td class="formValue">
                        <input id="MainPic" type="text" class="form-control" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <!-- 楼盘 -->
                        <table class="form" id="PProperty" style="display: block ">
                            <tr class="PropertyForm">
                                <th class="formTitle">所属省市区</th>
                                <td class="formValue" colspan="3">
                                    <div id="Province" type="select" class="ui-select" style="width: 205px; float: left; margin-right: 10px; "></div>
                                    <div id="City" type="select" class="ui-select" style="width: 205px; float: left; margin-right: 10px;"></div>
                                    <div id="Region" type="select" class="ui-select" style="width: 205px; float: left; margin-right: 10px; "></div>
                                    <div id="Township" type="select" class="ui-select" style="width: 205px; float: left; "></div>
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">详细地址</th>
                                <td class="formValue" colspan="3">
                                    <input id="Address" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">环线</th>
                                <td class="formValue">
                                    <input id="CircleLine" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">地铁</th>
                                <td class="formValue">
                                    <input id="Metro" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">经度</th>
                                <td class="formValue">
                                    <input id="LAT" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">纬度</th>
                                <td class="formValue">
                                    <input id="LNG" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">总建筑面积</th>
                                <td class="formValue">
                                    <input id="Area" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">占地面积</th>
                                <td class="formValue">
                                    <input id="CoverArea" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">绿化面积</th>
                                <td class="formValue">
                                    <input id="GreenArea" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">容积率</th>
                                <td class="formValue">
                                    <input id="VolumeRate" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">绿化率</th>
                                <td class="formValue">
                                    <input id="GreenRate" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">物业类型</th>
                                <td class="formValue" id="PPropertyType">
                                    <div id="PropertyType" type="select" class="ui-select"></div>
                                </td>
                                <th class="formTitle">建成年份</th>
                                <td class="formValue">
                                    <input id="CreateYear" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">开发商</th>
                                <td class="formValue">
                                    <input id="DeveloperName" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">物业公司</th>
                                <td class="formValue">
                                    <input id="PropertyCompany" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">物业标准费</th>
                                <td class="formValue">
                                    <input id="FeeItemRule" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">接盘日期</th>
                                <td class="formValue">
                                    <input id="Date" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">
                                    附加说明
                                </th>
                                <td class="formValue" colspan="3">
                                    <textarea id="Memo" class="form-control" style="height: 70px;"></textarea>
                                </td>
                            </tr>
                        </table>
                        <!--楼阁-->
                        <table class="form" id="PPavilion" style="display:none">
                            <tr>
                                <th class="formTitle">占地面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="CoverAreaPavilion" type="number" class="form-control" />
                                </td>

                                <th class="formTitle">楼高</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="Height" type="number" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">接盘日期</th>
                                <td class="formValue" colspan="3">
                                    <input id="DatePavilion" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" />
                                </td>
                            </tr>
                        </table>
                        <!--楼层-->
                        <table class="form" id="PFloor" style="display:none">
                            <tr>
                                <th class="formTitle">面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="AreaFloor" type="number" class="form-control" />
                                </td>
                            </tr>
                        </table>
                        <!--车库/广告位区域/场地区域/冷库-->
                        <table class="form" id="PGarage" style="display:none">
                            <tr>
                                <th class="formTitle">面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="AreaGarage" type="number" class="form-control" />
                                </td>
                                <th class="formTitle">交付日期</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="DateGarage" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">总数量</th>
                                <td class="formValue">
                                    <input id="Num" type="number" class="form-control" />
                                </td>
                            </tr>
                        </table>
                        <!--房间-->
                        <table class="form" id="PRoom" style="display:none">
                            <tr>
                                <th class="formTitle">物业类型</th>
                                <td class="formValue" id="PRoomType" style="width:570px;"></td>
                                <th class="formTitle">当前状态</th>
                                <td class="formValue" style="width:570px;">
                                    <div id="State" type="select" class="ui-select"></div>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">户型</th>
                                <td class="formValue">
                                    <div id="HouseType" type="select" class="ui-select"></div>

                                </td>
                                <th class="formTitle">朝向</th>
                                <td class="formValue">
                                    <div id="HouseTypeName" type="select" class="ui-select">

                                    </div>

                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">建筑面积</th>
                                <td class="formValue">
                                    <input id="Area" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">套内面积</th>
                                <td class="formValue">
                                    <input id="ComprisingConstructionArea" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">实用面积</th>
                                <td class="formValue">
                                    <input id="ActualArea" type="text" class="form-control" />
                                </td>
                                <th class="formTitle">计费面积</th>
                                <td class="formValue">
                                    <input id="ChargingArea" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">起租日期</th>
                                <td class="formValue">
                                    <input id="EMoveInDate" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" />
                                </td>
                                <th class="formTitle">月租金</th>
                                <td class="formValue">
                                    <input id="MonthlyRent" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">
                                    几号房
                                </th>
                                <td class="formValue">
                                    <input id="JuniorNum" type="number" class="form-control" value="1" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">
                                    招租标题
                                </th>
                                <td class="formValue" colspan="3">
                                    <textarea id="RentTitle" class="form-control" style="height: 70px;"></textarea>
                                </td>
                            </tr>

                            <tr>
                                <th class="formTitle">
                                    说明
                                </th>
                                <td class="formValue" colspan="3">
                                    <textarea id="Memo" class="form-control" style="height: 70px;"></textarea>
                                </td>
                            </tr>
                        </table>

            </table>
        </div>
        <div id="ImageInfo" class="form" style="display:none">
            <div style="margin: 10px">
                <div class="border" style="height: 295px; border-radius: 5px;">
                    <div class="drag-tip" style="text-align: center; padding-top: 100px;">

                    </div>
                </div>
            </div>
        </div>

        <div id="roomPanel" style="margin-left:10px;margin-right:30px;display:none">
            <table id="gridTable"></table>
        </div>
        <div id="ExpandInfo" class="tab-pane " style="margin-left: 10px;  margin-right: 30px;">
            <div class="form" id="Property">
                @*<ul class="nav nav-tabs">
                        <li class="active"><a href="#PropertyInfo" data-toggle="tab">物业公司资料</a></li>
                        <li><a href="#DeveloperInfo" data-toggle="tab">发展商资料</a></li>
                        <li><a href="#AgentsInfo" data-toggle="tab">代理商资料</a></li>
                    </ul>
                    <div class="tab-content" style="padding-top: 10px;">
                        <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;" id="PropertyInfo" class="tab-pane active">
                            <table class="form">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="PropertyCompany" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="PropertyCompanyLegal" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">管理处</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="PropertyContactPeople" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="PropertyTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="PropertyAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="DeveloperInfo" class="tab-pane " style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
                            <table class="form">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="DeveloperName" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="DeveloperCorporateName" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="DeveloperTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="DeveloperAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="AgentsInfo" class="tab-pane " style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
                            <table class="form" hidden="hidden">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="AgentsName" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="AgentsTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="AgentsAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>*@
            </div>
            <div class="form" id="UserInfo" style="display:none;">
                <input id="btn_User" style="width:90px;" type="button" class="form-control" value="添加" />
                <table id="UserTable">
                    <tr>
                        <th class="formTitle">住户类别</th>
                        <td class="formValue">
                            <div id="Flag" class="btn-group ">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 207px;">公司</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Flag(this)"><a data-value="0">公司</a></li>
                                    <li onclick="btn_Flag(this)"><a data-value="1">个人</a></li>
                                </ul>
                            </div>
                        </td>
                        <th class="formTitle">住户类型</th>
                        <td class="formValue">
                            <div id="Type" class="btn-group">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 190px; ">业主</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Type(this)"><a data-value="0">业主</a></li>
                                    <li onclick="btn_Type(this)"><a data-value="1">租户</a></li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle" id="isEnterprise">公司名称<font face="宋体">*</font></th>
                        <td class="formValue">
                            <input id="CampanyName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
                        </td>
                        <th class="formTitle">编码<font face="宋体">*</font></th>
                        <td class="formValue">
                            <input id="Code" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">经营种类</th>
                        <td class="formValue">
                            <input id="BCategory" type="text" class="form-control" />
                        </td>
                        <th class="formTitle">经营品牌</th>
                        <td class="formValue">
                            <input id="Brand" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">营业执照号</th>
                        <td class="formValue">
                            <input id="License" type="text" class="form-control" />
                        </td>
                        <th class="formTitle" id="isFlag">法人名称</th>
                        <td class="formValue">
                            <input id="Name" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">手机号码</th>
                        <td class="formValue">
                            <input id="Phone" type="number" class="form-control" />
                        </td>
                        <th class="formTitle">联系电话</th>
                        <td class="formValue">
                            <input id="LinkPhone" type="number" class="form-control" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">紧急联系人</th>
                        <td class="formValue">
                            <input id="LinkName" type="number" class="form-control" />
                        </td>
                        <th class="formTitle">紧急联系电话</th>
                        <td class="formValue">
                            <input id="LinkPhone1" type="number" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">联系地址</th>
                        <td class="formValue">
                            <input id="LinkAddress" type="text" class="form-control" />
                        </td>
                        <th class="formTitle">出生年月</th>
                        <td class="formValue">
                            <input id="Birth" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">性别</th>
                        <td class="formValue">
                            <div id="Gender" class="btn-group">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 207px; ">男</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Sex(this)"><a data-value="0">男</a></li>
                                    <li onclick="btn_Sex(this)"><a data-value="1">女</a></li>
                                </ul>
                            </div>
                        </td>
                        <th class="formTitle">身份证号</th>
                        <td class="formValue">
                            <input id="IDCard" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">民族</th>
                        <td class="formValue">
                            <input id="Nation" type="text" class="form-control" />
                        </td>
                        <th class="formTitle">家庭住址</th>
                        <td class="formValue">
                            <input id="Address" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">Fax</th>
                        <td class="formValue">
                            <input id="Fax" type="text" class="form-control" />
                        </td>
                        <th class="formTitle">Email</th>
                        <td class="formValue">
                            <input id="Email" type="text" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">WebChat</th>
                        <td class="formValue">
                            <input id="WeChat" type="text" class="form-control" />
                        </td>
                        <th class="formTitle">QQ</th>
                        <td class="formValue">
                            <input id="QQ" type="number" class="form-control" />
                        </td>
                    </tr>
                </table>
            </div>
            @*<div id="tishi" style="color:red;">请选择房产性质!</div>*@
        </div>

    </div>
</div>